Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>SQL injection</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/SQL_injection"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-SQL_injection rootpage-SQL_injection skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">SQL injection</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<p class="mw-empty-elt">
</p>

<p>In computing, <b>SQL injection</b> is a <a href="Code_injection" title="Code injection">code injection</a> technique used to <a href="Attack_(computing)" class="mw-redirect" title="Attack (computing)">attack</a> data-driven applications, in which malicious <a href="SQL" title="SQL">SQL</a> statements are inserted into an entry field for execution (e.g. to dump the <a href="Database" title="Database">database</a> contents to the attacker).<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-sfw2.12018_2-0" class="reference"><a href="#cite_note-sfw2.12018-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> SQL injection must exploit a <a href="Security_vulnerability" class="mw-redirect" title="Security vulnerability">security vulnerability</a> in an application's software, for example, when user input is either incorrectly filtered for <a href="String_literal" title="String literal">string literal</a> <a href="Escape_sequence" title="Escape sequence">escape characters</a> embedded in SQL statements or user input is not <a href="Strongly-typed_programming_language" class="mw-redirect" title="Strongly-typed programming language">strongly typed</a> and unexpectedly executed. SQL injection is mostly known as an <a href="Attack_vector" title="Attack vector">attack vector</a> for websites but can be used to attack any type of SQL database.
</p><p>SQL injection attacks allow attackers to <a href="Spoofing_attack" title="Spoofing attack">spoof</a> identity, tamper with existing <a href="Data" title="Data">data</a>, cause repudiation issues such as voiding transactions or changing balances, allow the complete disclosure of all data on the system, destroy the data or make it otherwise unavailable, and become administrators of the database server. Document-oriented <a href="NoSQL" title="NoSQL">NoSQL</a> databases can also be affected by this security vulnerability.
</p><p>SQL injection remains a widely recognized security risk due to its potential to compromise sensitive data. The <a href="Open_Web_Application_Security_Project" class="mw-redirect" title="Open Web Application Security Project">Open Web Application Security Project</a> (OWASP) describes it as a vulnerability that occurs when applications construct database queries using unvalidated user input. Exploiting this flaw, attackers can execute unintended database commands, potentially accessing, modifying, or deleting data. OWASP outlines several mitigation strategies, including <a href="Prepared_statement" title="Prepared statement">prepared statements</a>, <a href="Stored_procedure" title="Stored procedure">stored procedures</a>, and <a href="Input_validation" class="mw-redirect" title="Input validation">input validation</a>, to prevent user input from being misinterpreted as executable SQL code.<sup id="cite_ref-:0_3-0" class="reference"><a href="#cite_note-:0-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="History">History</h2></div>
<p>Discussions of SQL injection began in the late 1990s, including in a 1998 article in <a href="Phrack_Magazine" class="mw-redirect" title="Phrack Magazine">Phrack Magazine</a>.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> SQL injection was ranked among the top 10 web application vulnerabilities of 2007 and 2010 by the <a href="OWASP" title="OWASP">Open Web Application Security Project</a> (OWASP).<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> In 2013, SQL injection was listed as the most critical web application vulnerability in the OWASP Top 10.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup>
</p><p>In 2017, the <i>OWASP Top 10 Application Security Risks</i> grouped SQL injection under the broader category of "Injection," ranking it as the third most critical security threat. This category included various types of injection attacks, such as SQL, <a href="NoSQL" title="NoSQL">NoSQL</a>, OS command, and <a href="LDAP_injection" title="LDAP injection">LDAP injection</a>. These vulnerabilities arise when an application processes untrusted data as part of a command or query, potentially allowing attackers to execute unintended actions or gain unauthorized access to data.<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup>
</p><p>By 2021, injection remained a widespread issue, detected in 94% of analyzed applications, with reported incidence rates reaching up to 19%. That year’s <i>OWASP Top 10</i> further expanded the definition of injection vulnerabilities to include attacks targeting <a href="Object_Relational_Mapping" class="mw-redirect" title="Object Relational Mapping">Object Relational Mapping</a> (ORM) systems, <a href="Expression_language" title="Expression language">Expression Language</a> (EL), and Object Graph Navigation Library (OGNL). To address these risks, OWASP recommends strategies such as using secure <a href="API" title="API">APIs</a>, parameterized queries, input validation, and escaping special characters to prevent malicious data from being executed as part of a query.<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Root_cause">Root cause</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1305433154">
/* start https://en.wikipedia.org/ */


.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}


/* end https://en.wikipedia.org/ */
</style>
<p>SQL Injection is a common security vulnerability that arises from letting attacker supplied data become SQL code. This happens when programmers assemble SQL queries either by string interpolation or by concatenating SQL commands with user supplied data. Therefore, injection relies on the fact that SQL statements consist of both data used by the SQL statement and commands that control how the SQL statement is executed. For example, in the SQL statement <code class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><span class="k">select</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">person</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'susan'</span><span class="w"> </span><span class="k">and</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">2</span></code> the string '<code class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><span class="n">susan</span></code>' is data and the fragment <code class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><span class="k">and</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">2</span></code> is an example of a command (the value <code class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><span class="mi">2</span></code> is also data in this example).
</p><p>SQL injection occurs when specially crafted user input is processed by the receiving program in a way that allows the input to exit a data context and enter a command context. This allows the attacker to alter the structure of the SQL statement which is executed.
</p><p>As a simple example, imagine that the data '<code class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><span class="n">susan</span></code>' in the above statement was provided by user input. The user entered the string '<code class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><span class="n">susan</span></code>' (without the apostrophes) in a web form text entry field, and the program used <a href="String_concatenation" class="mw-redirect" title="String concatenation">string concatenation</a> statements to form the above SQL statement from the three fragments <code class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><span class="k">select</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">person</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">name</span><span class="o">=</span><span class="err">'</span></code>, the user input of '<code class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><span class="n">susan</span></code>', and <code class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><span class="err">'</span><span class="w"> </span><span class="k">and</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">2</span></code>.
</p><p>Now imagine that instead of entering '<code class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><span class="n">susan</span></code>' the attacker entered <code class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><span class="err">'</span><span class="w"> </span><span class="k">or</span><span class="w"> </span><span class="mi">1</span><span class="o">=</span><span class="mi">1</span><span class="p">;</span><span class="w"> </span><span class="c1">--</span></code>.
</p><p>The program will use the same string concatenation approach with the 3 fragments of <code class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><span class="k">select</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">person</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">name</span><span class="o">=</span><span class="err">'</span></code>, the user input of <code class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><span class="err">'</span><span class="w"> </span><span class="k">or</span><span class="w"> </span><span class="mi">1</span><span class="o">=</span><span class="mi">1</span><span class="p">;</span><span class="w"> </span><span class="c1">--</span></code>, and <code class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><span class="err">'</span><span class="w"> </span><span class="k">and</span><span class="w"> </span><span class="n">age</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">2</span></code> and construct the statement <code class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><span class="k">select</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">person</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">name</span><span class="o">=</span><span class="s1">''</span><span class="w"> </span><span class="k">or</span><span class="w"> </span><span class="mi">1</span><span class="o">=</span><span class="mi">1</span><span class="p">;</span><span class="w"> </span><span class="c1">--' and age = 2</span></code>. Many databases will ignore the text after the '--' string as this denotes a comment. The structure of the SQL command is now <code class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><span class="k">select</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">from</span><span class="w"> </span><span class="n">person</span><span class="w"> </span><span class="k">where</span><span class="w"> </span><span class="n">name</span><span class="o">=</span><span class="s1">''</span><span class="w"> </span><span class="k">or</span><span class="w"> </span><span class="mi">1</span><span class="o">=</span><span class="mi">1</span><span class="p">;</span></code> and this will select all person rows rather than just those named 'susan' whose age is 2. The attacker has managed to craft a data string which exits the data context and entered a command context.
</p>
<div class="mw-heading mw-heading2"><h2 id="Ways_to_exploit">Ways to exploit</h2></div>
<p>Although the root cause of all SQL injections is the same, there are different techniques to exploit it. Some of them are discussed below:
</p>
<div class="mw-heading mw-heading3"><h3 id="Getting_direct_output_or_action">Getting direct output or action</h3></div>
<p>Imagine a program creates a SQL statement using the following string assignment command&nbsp;:
</p><p><code class="mw-highlight mw-highlight-lang-javascript mw-content-ltr" dir="ltr"><span class="kd">var</span><span class="w"> </span><span class="nx">statement</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"SELECT * FROM users WHERE name = '"</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="nx">userName</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="s2">"'"</span><span class="p">;</span></code>
</p><p>This SQL code is designed to pull up the records of the specified username from its table of users. However, if the "userName" variable is crafted in a specific way by a malicious user, the SQL statement may do more than the code author intended. For example, setting the "userName" variable as:
</p>
<pre>' OR '1'='1</pre>
<p>or using comments to even block the rest of the query (there are three types of SQL comments<sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup>). All three lines have a space at the end:
</p>
<pre>' OR '1'='1' --
' OR '1'='1' {
' OR '1'='1' /* </pre>
<p>renders one of the following SQL statements by the parent language:
</p>
<div class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><pre><span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">users</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">''</span><span class="w"> </span><span class="k">OR</span><span class="w"> </span><span class="s1">'1'</span><span class="o">=</span><span class="s1">'1'</span><span class="p">;</span>
</pre></div>
<div class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><pre><span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">users</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">''</span><span class="w"> </span><span class="k">OR</span><span class="w"> </span><span class="s1">'1'</span><span class="o">=</span><span class="s1">'1'</span><span class="w"> </span><span class="c1">-- ';</span>
</pre></div>
<p>If this code were to be used in authentication procedure then this example could be used to force the selection of every data field (*) from <i>all</i> users rather than from one specific user name as the coder intended, because the evaluation of '1'='1' is always true.
</p><p>The following value of "userName" in the statement below would cause the deletion of the "users" table as well as the selection of all data from the "userinfo" table (in essence revealing the information of every user), using an <a href="API" title="API">API</a> that allows multiple statements:
</p><p><code class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><span class="n">a</span><span class="err">'</span><span class="p">;</span></code><code class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><span class="k">DROP</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">users</span><span class="p">;</span><span class="w"> </span><span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">userinfo</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="s1">'t'</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="err">'</span><span class="n">t</span></code>
</p><p>This input renders the final SQL statement as follows and specified:
</p>
<div class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><pre><span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">users</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'a'</span><span class="p">;</span><span class="k">DROP</span><span class="w"> </span><span class="k">TABLE</span><span class="w"> </span><span class="n">users</span><span class="p">;</span><span class="w"> </span><span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">userinfo</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="s1">'t'</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'t'</span><span class="p">;</span>
</pre></div>
<p>While most SQL server implementations allow multiple statements to be executed with one call in this way, some SQL APIs such as <a href="PHP" title="PHP">PHP</a>'s <code>mysql_query()</code> function do not allow this for security reasons. This prevents attackers from injecting entirely separate queries, but doesn't stop them from modifying queries.
</p>
<div class="mw-heading mw-heading3"><h3 id="Blind_SQL_injection">Blind SQL injection</h3></div>
<p>Blind SQL injection is used when a web application is vulnerable to a SQL injection, but the results of the injection are not visible to the attacker. The page with the vulnerability may not be one that displays data but will display differently depending on the results of a logical statement injected into the legitimate SQL statement called for that page.
This type of attack has traditionally been considered time-intensive because a new statement needed to be crafted for each bit recovered, and depending on its structure, the attack may consist of many unsuccessful requests. Recent advancements have allowed each request to recover multiple bits, with no unsuccessful requests, allowing for more consistent and efficient extraction.<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup> There are several tools that can automate these attacks once the location of the vulnerability and the target information has been established.<sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading4"><h4 id="Conditional_responses">Conditional responses</h4></div>
<p>One type of blind SQL injection forces the database to evaluate a logical statement on an ordinary application screen. As an example, a book review website uses a <a href="Query_string" title="Query string">query string</a> to determine which book review to display. So the <a href="URL" title="URL">URL</a> <code>https://books.example.com/review?id=5</code> would cause the server to run the query
</p>
<div class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><pre><span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">bookreviews</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">ID</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'5'</span><span class="p">;</span>
</pre></div>
<p>from which it would populate the review page with data from the review with <a href="Identifier" title="Identifier">ID</a> 5, stored in the <a href="Table_(database)" title="Table (database)">table</a> bookreviews. The query happens completely on the server; the user does not know the names of the database, table, or fields, nor does the user know the query string. The user only sees that the above URL returns a book review. A <a href="Security_hacker" title="Security hacker">hacker</a> can load the URLs <code><code class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">books</span><span class="p">.</span><span class="n">example</span><span class="p">.</span><span class="n">com</span><span class="o">/</span><span class="n">review</span><span class="o">?</span><span class="n">id</span><span class="o">=</span><span class="mi">5</span><span class="s1">' OR '</span><span class="mi">1</span><span class="s1">'='</span><span class="mi">1</span></code></code> and <code><code class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">books</span><span class="p">.</span><span class="n">example</span><span class="p">.</span><span class="n">com</span><span class="o">/</span><span class="n">review</span><span class="o">?</span><span class="n">id</span><span class="o">=</span><span class="mi">5</span><span class="s1">' AND '</span><span class="mi">1</span><span class="s1">'='</span><span class="mi">2</span></code></code>, which may result in queries
</p>
<div class="mw-highlight mw-highlight-lang-sql mw-content-ltr" dir="ltr"><pre><span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">bookreviews</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">ID</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'5'</span><span class="w"> </span><span class="k">OR</span><span class="w"> </span><span class="s1">'1'</span><span class="o">=</span><span class="s1">'1'</span><span class="p">;</span>
<span class="k">SELECT</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">bookreviews</span><span class="w"> </span><span class="k">WHERE</span><span class="w"> </span><span class="n">ID</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'5'</span><span class="w"> </span><span class="k">AND</span><span class="w"> </span><span class="s1">'1'</span><span class="o">=</span><span class="s1">'2'</span><span class="p">;</span>
</pre></div>
<p>respectively. If the original review loads with the "1=1" URL and a blank or error page is returned from the "1=2" URL, and the returned page has not been created to alert the user the input is invalid, or in other words, has been caught by an input test script, the site is likely vulnerable to an SQL injection attack as the query will likely have passed through successfully in both cases. The hacker may proceed with this query string designed to reveal the version number of <a href="MySQL" title="MySQL">MySQL</a> running on the server: <code><code class="mw-highlight mw-highlight-lang-mysql mw-content-ltr" dir="ltr"><span class="n">https</span><span class="o">://</span><span class="n">books</span><span class="p">.</span><span class="n">example</span><span class="p">.</span><span class="n">com</span><span class="o">/</span><span class="n">review</span><span class="nv">?</span><span class="n">id</span><span class="o">=</span><span class="mi">5</span><span class="w"> </span><span class="k">AND</span><span class="w"> </span><span class="nf">substring</span><span class="p">(</span><span class="nv">@@version</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="nf">INSTR</span><span class="p">(</span><span class="nv">@@version</span><span class="p">,</span><span class="w"> </span><span class="s1">'.'</span><span class="p">)</span><span class="w"> </span><span class="o">-</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span><span class="o">=</span><span class="mi">4</span></code></code>, which would show the book review on a server running MySQL 4 and a blank or error page otherwise. The hacker can continue to use code within query strings to achieve their goal directly, or to glean more information from the server in hopes of discovering another avenue of attack.<sup id="cite_ref-13" class="reference"><a href="#cite_note-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Second-order_SQL_injection">Second-order SQL injection</h3></div>
<p>Second-order SQL injection occurs when an application only guards its SQL against immediate user input, but has a less strict policy when dealing with data already stored in the system. Therefore, although such application would manage to safely process the user input and store it without issue, it would store the malicious SQL statement as well. Then, when another part of that application would use that data in a query that isn't protected from SQL injection, this malicious statement might get executed. This attack requires more knowledge of how submitted values are later used. Automated web application security scanners would not easily detect this type of SQL injection and may need to be manually instructed where to check for evidence that it is being attempted.
</p><p>In order to protect from this kind of attack, all SQL processing must be uniformly secure, despite the data source.
</p>
<div class="mw-heading mw-heading2"><h2 id="SQL_injection_mitigation">SQL injection mitigation</h2></div>
<p>SQL injection is a well-known attack that can be mitigated with established security measures. However, a 2015 <a href="Cyberattack" title="Cyberattack">cyberattack</a> on British telecommunications company <a href="TalkTalk_Group" title="TalkTalk Group">TalkTalk</a> exploited an SQL injection vulnerability, compromising the personal data of approximately 400,000 customers. The <i><a href="BBC" title="BBC">BBC</a></i> reported that security experts expressed surprise that a major company remained vulnerable to such an exploit.<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup>
</p><p>A variety of defensive measures exist to mitigate SQL injection risks by preventing attackers from injecting malicious SQL code into database queries. Core mitigation strategies, as outlined by <a href="OWASP" title="OWASP">OWASP</a>, include parameterized queries, <a href="Input_validation" class="mw-redirect" title="Input validation">input validation</a>, and least privilege access controls, which limit the ability of user input to alter SQL queries and execute unintended commands.<sup id="cite_ref-:0_3-1" class="reference"><a href="#cite_note-:0-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> In addition to preventive measures, detection techniques help identify potential SQL injection attempts. Methods such as <a href="Pattern_matching" title="Pattern matching">pattern matching</a>, <a href="Software_testing" title="Software testing">software testing</a>, and grammar analysis examine query structures and user inputs to detect irregularities that may indicate an injection attempt.<sup id="cite_ref-sfw2.12018_2-1" class="reference"><a href="#cite_note-sfw2.12018-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Core_mitigation">Core mitigation</h3></div>
<div class="mw-heading mw-heading4"><h4 id="Parameterized_statements">Parameterized statements</h4></div>
<style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Prepared_statement" title="Prepared statement">Prepared statement</a></div>
<p>Most development platforms support parameterized statements, also known as placeholders or <a href="Bind_variable" class="mw-redirect" title="Bind variable">bind variables</a>, to securely handle user input instead of embedding it in SQL queries. These placeholders store only values of a defined type, preventing input from altering the query structure. As a result, SQL injection attempts are processed as unexpected input rather than executable code. With parametrized queries, SQL code remains separate from user input, and each parameter is passed as a distinct value, preventing it from being interpreted as part of the SQL statement.<sup id="cite_ref-:0_3-2" class="reference"><a href="#cite_note-:0-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading4"><h4 id="Allow-list_input_validation">Allow-list input validation</h4></div>
<p><a href="Allow-list" class="mw-redirect" title="Allow-list">Allow-list</a> input validation ensures that only explicitly defined inputs are accepted, reducing the risk of injection attacks. Unlike <a href="Deny_list" class="mw-redirect" title="Deny list">deny-lists</a>, which attempt to block known malicious patterns but can be bypassed, allow-lists specify valid input and reject everything else. This approach is particularly effective for <a href="Structured_data" class="mw-redirect" title="Structured data">structured data</a>, such as dates and email addresses, where strict validation rules can be applied. While input validation alone does not prevent SQL injection and other attacks, it can act as an additional safeguard by identifying and filtering unauthorized input before it reaches an SQL query.<sup id="cite_ref-:0_3-3" class="reference"><a href="#cite_note-:0-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading4"><h4 id="Least_privilege">Least privilege</h4></div>
<p>According to OWASP, the <a href="Principle_of_least_privilege" title="Principle of least privilege">principle of least privilege</a> helps mitigate SQL injection risks by ensuring database accounts have only the minimum permissions necessary. Read-only accounts should not have modification privileges, and application accounts should never have administrative access. Restricting database permissions is a key part of this approach, as limiting access to system tables and restricting user roles can reduce the risk of SQL injection attacks. Separating database users for different functions, such as authentication and data modification, further limits potential damage from SQL injection attacks.<sup id="cite_ref-:0_3-4" class="reference"><a href="#cite_note-:0-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p><p>Restricting database permissions on the web application's database login further reduces the impact of SQL injection vulnerabilities. Ensuring that accounts have only the necessary access, such as restricting SELECT permissions on critical system tables, can mitigate potential exploits.
</p><p>On <a href="Microsoft_SQL_Server" title="Microsoft SQL Server">Microsoft SQL Server</a>, limiting SELECT access to system tables can prevent SQL injection attacks that attempt to modify database schema or inject malicious scripts. For example, the following permissions restrict a database user from accessing system objects:
</p>
<div class="mw-highlight mw-highlight-lang-tsql mw-content-ltr" dir="ltr"><pre><span class="k">deny</span><span class="w"> </span><span class="k">select</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="n">sys</span><span class="p">.</span><span class="n">sysobjects</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="n">webdatabaselogon</span><span class="p">;</span>
<span class="k">deny</span><span class="w"> </span><span class="k">select</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="n">sys</span><span class="p">.</span><span class="n">objects</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="n">webdatabaselogon</span><span class="p">;</span>
<span class="k">deny</span><span class="w"> </span><span class="k">select</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="n">sys</span><span class="p">.</span><span class="n">tables</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="n">webdatabaselogon</span><span class="p">;</span>
<span class="k">deny</span><span class="w"> </span><span class="k">select</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="n">sys</span><span class="p">.</span><span class="n">views</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="n">webdatabaselogon</span><span class="p">;</span>
<span class="k">deny</span><span class="w"> </span><span class="k">select</span><span class="w"> </span><span class="k">on</span><span class="w"> </span><span class="n">sys</span><span class="p">.</span><span class="n">packages</span><span class="w"> </span><span class="k">to</span><span class="w"> </span><span class="n">webdatabaselogon</span><span class="p">;</span>
</pre></div>
<div class="mw-heading mw-heading3"><h3 id="Supplementary_mitigation">Supplementary mitigation</h3></div>
<div class="mw-heading mw-heading4"><h4 id="Object_relational_mappers">Object relational mappers</h4></div>
<p><a href="Object%E2%80%93relational_mapping" title="Object–relational mapping">Object–relational mapping</a> (ORM) frameworks provide an <a href="Object-oriented_interface" class="mw-redirect" title="Object-oriented interface">object-oriented interface</a> for interacting with <a href="Relational_database" title="Relational database">relational databases</a>. While ORMs typically offer built-in protections against SQL injection, they can still be vulnerable if not properly implemented. Some ORM-generated queries may allow unsanitized input, leading to injection risks. Additionally, many ORMs allow developers to execute raw SQL queries, which if improperly handled can introduce SQL injection vulnerabilities.<sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Deprecated/secondary_approaches">Deprecated/secondary approaches</h3></div>
<p>String escaping is generally discouraged as a primary defense against SQL injection. <a href="OWASP" title="OWASP">OWASP</a> describes this approach as "frail compared to other defenses" and notes that it may not be effective in all situations. Instead, OWASP recommends using "parameterized queries, stored procedures, or some kind of Object Relational Mapper (ORM) that builds your queries for you" as more reliable methods for mitigating SQL injection risks.<sup id="cite_ref-:0_3-5" class="reference"><a href="#cite_note-:0-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading4"><h4 id="String_escaping">String escaping</h4></div>
<p>One of the traditional ways to prevent injections is to add <i>every piece of data as a quoted string</i> and <a href="Escape_sequence" title="Escape sequence">escape</a> all characters, that have special meaning in SQL strings, in that data.<sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup> The manual for an SQL DBMS explains which characters have a special meaning, which allows creating a comprehensive <a href="Blacklist_(computing)" title="Blacklist (computing)">blacklist</a> of characters that need translation. For instance, every occurrence of a single quote (<code>'</code>) in a string parameter must be prepended with a backslash (<code>\</code>) so that the database understands the single quote is part of a given string, rather than its terminator. <a href="PHP" title="PHP">PHP</a>'s <a href="MySQLi" title="MySQLi">MySQLi</a> module provides the <code>mysqli_real_escape_string()</code> function to escape strings according to <a href="MySQL" title="MySQL">MySQL</a> semantics; in the following example the username is a string parameter, and therefore it can be protected by means of string escaping:
</p>
<div class="mw-highlight mw-highlight-lang-php mw-content-ltr" dir="ltr"><pre><span class="nv">$mysqli</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">mysqli</span><span class="p">(</span><span class="s1">'hostname'</span><span class="p">,</span> <span class="s1">'db_username'</span><span class="p">,</span> <span class="s1">'db_password'</span><span class="p">,</span> <span class="s1">'db_name'</span><span class="p">);</span>
<span class="nv">$query</span> <span class="o">=</span> <span class="nb">sprintf</span><span class="p">(</span><span class="s2">"SELECT * FROM `Users` WHERE UserName='%s'"</span><span class="p">,</span>
<span class="nv">$mysqli</span><span class="o">-&gt;</span><span class="na">real_escape_string</span><span class="p">(</span><span class="nv">$username</span><span class="p">),</span>
<span class="nv">$mysqli</span><span class="o">-&gt;</span><span class="na">query</span><span class="p">(</span><span class="nv">$query</span><span class="p">);</span>
</pre></div>
<p>Besides, not every piece of data can be added to SQL as a string literal (MySQL's LIMIT clause arguments<sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup> or table/column names<sup id="cite_ref-21" class="reference"><a href="#cite_note-21"><span class="cite-bracket">[</span>21<span class="cite-bracket">]</span></a></sup> for example) and in this case escaping string-related special characters will do no good whatsoever, leaving resulting SQL open to injections.
</p>
<div class="mw-heading mw-heading2"><h2 id="Examples">Examples</h2></div>
<ul><li>In February 2002, Jeremiah Jacks discovered that Guess.com was vulnerable to an SQL injection attack, permitting anyone able to construct a properly-crafted URL to pull down 200,000+ names, credit card numbers and expiration dates in the site's customer database.<sup id="cite_ref-22" class="reference"><a href="#cite_note-22"><span class="cite-bracket">[</span>22<span class="cite-bracket">]</span></a></sup></li>
<li>On November 1, 2005, a teenaged hacker used SQL injection to break into the site of a <a href="Taiwan" title="Taiwan">Taiwanese</a> information security magazine from the Tech Target group and steal customers' information.<sup id="cite_ref-23" class="reference"><a href="#cite_note-23"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup></li>
<li>On January 13, 2006, <a href="Russia" title="Russia">Russian</a> computer criminals broke into a <a href="Government_of_Rhode_Island" title="Government of Rhode Island">Rhode Island government</a> website and allegedly stole credit card data from individuals who have done business online with state agencies.<sup id="cite_ref-24" class="reference"><a href="#cite_note-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup></li>
<li>On September 19, 2007 and January 26, 2009 the Turkish hacker group "m0sted" used SQL injection to exploit Microsoft's SQL Server to hack web servers belonging to <a href="McAlester_Army_Ammunition_Plant" title="McAlester Army Ammunition Plant">McAlester Army Ammunition Plant</a> and the <a href="United_States_Army_Corps_of_Engineers" title="United States Army Corps of Engineers">US Army Corps of Engineers</a> respectively.<sup id="cite_ref-25" class="reference"><a href="#cite_note-25"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup></li>
<li>On April 13, 2008, the <a href="Sex_offender_registries_in_the_United_States" title="Sex offender registries in the United States">Sexual and Violent Offender Registry</a> of <a href="Oklahoma" title="Oklahoma">Oklahoma</a> shut down its website for "<a href="Routine_maintenance" class="mw-redirect" title="Routine maintenance">routine maintenance</a>" after being informed that 10,597 <a href="Social_Security_number" title="Social Security number">Social Security numbers</a> belonging to <a href="Sex_offender" title="Sex offender">sex offenders</a> had been downloaded via an SQL injection attack<sup id="cite_ref-26" class="reference"><a href="#cite_note-26"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup></li>
<li>On August 17, 2009, the <a href="United_States_Department_of_Justice" title="United States Department of Justice">United States Department of Justice</a> charged an American citizen, <a href="Albert_Gonzalez" title="Albert Gonzalez">Albert Gonzalez</a>, and two unnamed Russians with the theft of 130 million credit card numbers using an SQL injection attack. In reportedly "the biggest case of <a href="Identity_theft" title="Identity theft">identity theft</a> in American history", the man stole cards from a number of corporate victims after researching their <a href="Payment_processor" title="Payment processor">payment processing systems</a>. Among the companies hit were credit card processor <a href="Heartland_Payment_Systems" title="Heartland Payment Systems">Heartland Payment Systems</a>, convenience store chain <a href="7-Eleven" title="7-Eleven">7-Eleven</a>, and supermarket chain <a href="Hannaford_Brothers" class="mw-redirect" title="Hannaford Brothers">Hannaford Brothers</a>.<sup id="cite_ref-27" class="reference"><a href="#cite_note-27"><span class="cite-bracket">[</span>27<span class="cite-bracket">]</span></a></sup></li>
<li>In July 2010, a South American security researcher who goes by the <a href="User_(computing)" title="User (computing)">handle</a> "Ch&nbsp;Russo" obtained sensitive user information from popular <a href="BitTorrent" title="BitTorrent">BitTorrent</a> site <a href="The_Pirate_Bay" title="The Pirate Bay">The Pirate Bay</a>. He gained access to the site's administrative control panel and exploited an SQL injection vulnerability that enabled him to collect user account information, including <a href="IP_address" title="IP address">IP addresses</a>, <a href="MD5" title="MD5">MD5</a> <a href="Cryptographic_hash_function" title="Cryptographic hash function">password hashes</a> and records of which torrents individual users have uploaded.<sup id="cite_ref-28" class="reference"><a href="#cite_note-28"><span class="cite-bracket">[</span>28<span class="cite-bracket">]</span></a></sup></li>
<li>From July 24 to 26, 2010, attackers from <a href="Japan" title="Japan">Japan</a> and <a href="China" title="China">China</a> used an SQL injection to gain access to customers' credit card data from Neo Beat, an <a href="Osaka" title="Osaka">Osaka</a>-based company that runs a large online supermarket site. The attack also affected seven business partners including supermarket chains Izumiya Co, Maruetsu Inc, and Ryukyu Jusco Co. The theft of data affected a reported 12,191 customers. As of August 14, 2010 it was reported that there have been more than 300 cases of credit card information being used by third parties to purchase goods and services in China.</li>
<li>On September 19 during the <a href="2010_Swedish_general_election" title="2010 Swedish general election">2010 Swedish general election</a> a voter attempted a code injection by hand writing SQL commands as part of a <a href="Write-in_candidate" title="Write-in candidate">write-in</a> vote.<sup id="cite_ref-29" class="reference"><a href="#cite_note-29"><span class="cite-bracket">[</span>29<span class="cite-bracket">]</span></a></sup></li>
<li>On November 8, 2010 the British <a href="Royal_Navy" title="Royal Navy">Royal Navy</a> website was compromised by a Romanian hacker named <a href="TinKode" title="TinKode">TinKode</a> using SQL injection.<sup id="cite_ref-30" class="reference"><a href="#cite_note-30"><span class="cite-bracket">[</span>30<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-31" class="reference"><a href="#cite_note-31"><span class="cite-bracket">[</span>31<span class="cite-bracket">]</span></a></sup></li>
<li>On April 11, 2011, <a href="Barracuda_Networks" title="Barracuda Networks">Barracuda Networks</a> was compromised using an SQL injection flaw. <a href="Email_address" title="Email address">Email addresses</a> and usernames of employees were among the information obtained.<sup id="cite_ref-32" class="reference"><a href="#cite_note-32"><span class="cite-bracket">[</span>32<span class="cite-bracket">]</span></a></sup></li>
<li>Over a period of 4&nbsp;hours on April 27, 2011, an automated SQL injection attack occurred on <a href="Broadband_Reports" class="mw-redirect" title="Broadband Reports">Broadband Reports</a> website that was able to extract 8% of the username/password pairs: 8,000 random accounts of the 9,000 active and 90,000 old or inactive accounts.<sup id="cite_ref-DSLReports_33-0" class="reference"><a href="#cite_note-DSLReports-33"><span class="cite-bracket">[</span>33<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-Cnet_News_34-0" class="reference"><a href="#cite_note-Cnet_News-34"><span class="cite-bracket">[</span>34<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-The_Tech_Herald_35-0" class="reference"><a href="#cite_note-The_Tech_Herald-35"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup></li>
<li>On June 1, 2011, "<a href="Hacktivist" class="mw-redirect" title="Hacktivist">hacktivists</a>" of the group <a href="LulzSec" title="LulzSec">LulzSec</a> were accused of using SQL injection to steal <a href="Coupon" title="Coupon">coupons</a>, download keys, and passwords that were stored in plaintext on <a href="Sony" title="Sony">Sony</a>'s website, accessing the personal information of a million users.<sup id="cite_ref-36" class="reference"><a href="#cite_note-36"><span class="cite-bracket">[</span>36<span class="cite-bracket">]</span></a></sup></li>
<li>In June 2011, <a href="PBS" title="PBS">PBS</a> was hacked by LulzSec, most likely through use of SQL injection; the full process used by hackers to execute SQL injections was described in this <a rel="nofollow" class="external text" href="http://blog.imperva.com/2011/05/pbs-breached-how-hackers-probably-did-it.html">Imperva</a> blog.<sup id="cite_ref-PBS_Breached_-_How_Hackers_Probably_Did_It_37-0" class="reference"><a href="#cite_note-PBS_Breached_-_How_Hackers_Probably_Did_It-37"><span class="cite-bracket">[</span>37<span class="cite-bracket">]</span></a></sup></li>
<li><a href="2012_Yahoo!_Voices_hack" class="mw-redirect" title="2012 Yahoo! Voices hack">In July 2012</a> a hacker group was reported to have stolen 450,000 login credentials from <a href="Yahoo!" class="mw-redirect" title="Yahoo!">Yahoo!</a>. The logins were stored in <a href="Plain_text" title="Plain text">plain text</a> and were allegedly taken from a Yahoo <a href="Subdomain" title="Subdomain">subdomain</a>, <a href="Yahoo!_Voices" class="mw-redirect" title="Yahoo! Voices">Yahoo! Voices</a>. The group breached Yahoo's security by using a "<a href="Set_operations_(SQL)#UNION_operator" title="Set operations (SQL)">union</a>-based SQL injection technique".<sup id="cite_ref-38" class="reference"><a href="#cite_note-38"><span class="cite-bracket">[</span>38<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-39" class="reference"><a href="#cite_note-39"><span class="cite-bracket">[</span>39<span class="cite-bracket">]</span></a></sup></li>
<li>On October 1, 2012, a hacker group called "Team GhostShell" published the personal records of students, faculty, employees, and alumni from 53 universities, including <a href="Harvard_University" title="Harvard University">Harvard</a>, <a href="Princeton_University" title="Princeton University">Princeton</a>, <a href="Stanford_University" title="Stanford University">Stanford</a>, <a href="Cornell_University" title="Cornell University">Cornell</a>, <a href="Johns_Hopkins_University" title="Johns Hopkins University">Johns Hopkins</a>, and the <a href="University_of_Zurich" title="University of Zurich">University of Zurich</a> on <a href="Pastebin" title="Pastebin">pastebin.com</a>. The hackers claimed that they were trying to "raise awareness towards the changes made in today's education", bemoaning changing education laws in Europe and increases in <a href="College_tuition_in_the_United_States" title="College tuition in the United States">tuition in the United States</a>.<sup id="cite_ref-40" class="reference"><a href="#cite_note-40"><span class="cite-bracket">[</span>40<span class="cite-bracket">]</span></a></sup></li>
<li>On November 4, 2013, hacktivist group "RaptorSwag" allegedly compromised 71 Chinese government databases using an SQL injection attack on the Chinese Chamber of International Commerce. The leaked data was posted publicly in cooperation with <a href="Anonymous_(group)" class="mw-redirect" title="Anonymous (group)">Anonymous</a>.<sup id="cite_ref-41" class="reference"><a href="#cite_note-41"><span class="cite-bracket">[</span>41<span class="cite-bracket">]</span></a></sup></li>
<li>In August 2014, <a href="Milwaukee" title="Milwaukee">Milwaukee</a>-based computer security company Hold Security disclosed that it uncovered <a href="2014_Russian_hacker_password_theft" title="2014 Russian hacker password theft">a theft of confidential information</a> from nearly 420,000 websites through SQL injections.<sup id="cite_ref-42" class="reference"><a href="#cite_note-42"><span class="cite-bracket">[</span>42<span class="cite-bracket">]</span></a></sup> <i><a href="The_New_York_Times" title="The New York Times">The New York Times</a></i> confirmed this finding by hiring a security expert to check the claim.<sup id="cite_ref-43" class="reference"><a href="#cite_note-43"><span class="cite-bracket">[</span>43<span class="cite-bracket">]</span></a></sup></li>
<li>In October 2015, an SQL injection attack was used to steal the personal details of 156,959 customers from British telecommunications company <a href="TalkTalk_Group" title="TalkTalk Group">TalkTalk's</a> servers, exploiting a vulnerability in a legacy web portal.<sup id="cite_ref-44" class="reference"><a href="#cite_note-44"><span class="cite-bracket">[</span>44<span class="cite-bracket">]</span></a></sup></li>
<li>In early 2021, 70 gigabytes of data was <a href="Data_exfiltration" title="Data exfiltration">exfiltrated</a> from the far-right website <a href="Gab_(social_network)" title="Gab (social network)">Gab</a> through an SQL injection attack. The vulnerability was introduced into the Gab codebase by Fosco Marotto, Gab's <a href="Chief_technology_officer" title="Chief technology officer">CTO</a>.<sup id="cite_ref-45" class="reference"><a href="#cite_note-45"><span class="cite-bracket">[</span>45<span class="cite-bracket">]</span></a></sup> A second attack against Gab was launched the next week using <a href="OAuth2" class="mw-redirect" title="OAuth2">OAuth2</a> tokens stolen during the first attack.<sup id="cite_ref-46" class="reference"><a href="#cite_note-46"><span class="cite-bracket">[</span>46<span class="cite-bracket">]</span></a></sup></li>
<li>In May 2023, a widespread SQL injection attack targeted <a href="MOVEit" title="MOVEit">MOVEit</a>, a widely used <a href="File_transfer_service" class="mw-redirect" title="File transfer service">file-transfer service</a>. The attacks, attributed to the Russian-speaking cybercrime group <a href="Clop_(cyber_gang)" title="Clop (cyber gang)">Clop</a>, compromised multiple global organizations, including payroll provider Zellis, <a href="British_Airways" title="British Airways">British Airways</a>, the <a href="BBC" title="BBC">BBC</a>, and UK retailer <a href="Boots_(company)" title="Boots (company)">Boots</a>. Attackers exploited a critical vulnerability, installing a custom webshell called "LemurLoot" to rapidly access and exfiltrate large volumes of data.<sup id="cite_ref-47" class="reference"><a href="#cite_note-47"><span class="cite-bracket">[</span>47<span class="cite-bracket">]</span></a></sup></li>
<li>In 2024, a pair of security researchers discovered an SQL injection vulnerability in the FlyCASS system, used by the <a href="Transportation_Security_Administration" title="Transportation Security Administration">Transportation Security Administration</a> (TSA) to verify airline crew members. Exploiting this flaw provided unauthorized administrative access, potentially allowing the addition of false crew records. The TSA stated that its verification procedures did not solely depend on this database.<sup id="cite_ref-48" class="reference"><a href="#cite_note-48"><span class="cite-bracket">[</span>48<span class="cite-bracket">]</span></a></sup></li></ul>
<div class="mw-heading mw-heading2"><h2 id="In_popular_culture">In popular culture</h2></div>
<ul><li>A 2007 <i><a href="Xkcd" title="Xkcd">xkcd</a></i> cartoon involved a character <i>Robert'); DROP TABLE Students;--</i> named to carry out an SQL injection. As a result of this cartoon, SQL injection is sometimes informally referred to as "Bobby Tables".<sup id="cite_ref-49" class="reference"><a href="#cite_note-49"><span class="cite-bracket">[</span>49<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-50" class="reference"><a href="#cite_note-50"><span class="cite-bracket">[</span>50<span class="cite-bracket">]</span></a></sup></li>
<li>Unauthorized login to websites by means of SQL injection forms the basis of one of the subplots in <a href="J.K._Rowling" class="mw-redirect" title="J.K. Rowling">J.K. Rowling</a>'s 2012 novel <i><a href="The_Casual_Vacancy" title="The Casual Vacancy">The Casual Vacancy</a></i>.</li>
<li>In 2014, an individual in Poland legally renamed his business to <i>Dariusz Jakubowski x'; DROP TABLE users; SELECT '1</i> in an attempt to disrupt operation of spammers' <a href="Web_scraping" title="Web scraping">harvesting bots</a>.<sup id="cite_ref-51" class="reference"><a href="#cite_note-51"><span class="cite-bracket">[</span>51<span class="cite-bracket">]</span></a></sup></li>
<li>The 2015 game <i><a href="Hacknet" title="Hacknet">Hacknet</a></i> has a hacking program called SQL_MemCorrupt. It is described as injecting a table entry that causes a corruption error in an SQL database, then queries said table, causing an SQL database crash and <a href="Core_dump" title="Core dump">core dump</a>.</li></ul>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Code_injection" title="Code injection">Code injection</a></li>
<li><a href="Cross-site_scripting" title="Cross-site scripting">Cross-site scripting</a></li>
<li><a href="Metasploit_Project" class="mw-redirect" title="Metasploit Project">Metasploit Project</a></li>
<li><a href="OWASP" title="OWASP">OWASP</a> Open Web Application Security Project</li>
<li><a href="Prompt_injection" title="Prompt injection">Prompt injection</a>, a similar concept applied to artificial intelligence</li>
<li><a href="SGML_entity" title="SGML entity">SGML entity</a></li>
<li><a href="Uncontrolled_format_string" title="Uncontrolled format string">Uncontrolled format string</a></li>
<li><a href="W3af" title="W3af">w3af</a></li>
<li><a href="Web_application_security" class="mw-redirect" title="Web application security">Web application security</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist reflist-columns references-column-width" style="column-width: 30em;">
<ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFMicrosoft" class="citation web cs1">Microsoft. <a rel="nofollow" class="external text" href="https://technet.microsoft.com/en-us/library/ms161953%28v=SQL.105%29.aspx">"SQL Injection"</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20130802094425/http://technet.microsoft.com/en-us/library/ms161953(v=sql.105).aspx">Archived</a> from the original on August 2, 2013<span class="reference-accessdate">. Retrieved <span class="nowrap">August 4,</span> 2013</span>. <q>SQL injection is an attack in which malicious code is inserted into strings that are later passed to an instance of SQL Server for parsing and execution. Any procedure that constructs SQL statements should be reviewed for injection vulnerabilities because SQLi Server will execute all syntactically valid queries that it receives. Even parameterized data can be manipulated by a skilled and determined attacker.</q></cite></span>
</li>
<li id="cite_note-sfw2.12018-2"><span class="mw-cite-backlink">^ <a href="#cite_ref-sfw2.12018_2-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-sfw2.12018_2-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFZhuoCaiZhangLv2021" class="citation journal cs1">Zhuo, Z.; Cai, T.; Zhang, X.; Lv, F. (April 2021). <a rel="nofollow" class="external text" href="https://doi.org/10.1049%2Fsfw2.12018">"Long short-term memory on abstract syntax tree for SQL injection detection"</a>. <i>IET Software</i>. <b>15</b> (2): <span class="nowrap">188–</span>197. <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://doi.org/10.1049%2Fsfw2.12018">10.1049/sfw2.12018</a></span>. <a href="ISSN_(identifier)" class="mw-redirect" title="ISSN (identifier)">ISSN</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/issn/1751-8806">1751-8806</a>. <a href="S2CID_(identifier)" class="mw-redirect" title="S2CID (identifier)">S2CID</a>&nbsp;<a rel="nofollow" class="external text" href="https://api.semanticscholar.org/CorpusID:233582569">233582569</a>.</cite></span>
</li>
<li id="cite_note-:0-3"><span class="mw-cite-backlink">^ <a href="#cite_ref-:0_3-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-:0_3-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-:0_3-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-:0_3-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-:0_3-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-:0_3-5"><sup><i><b>f</b></i></sup></a></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html">"SQL Injection Prevention Cheat Sheet"</a>. <i>Open Web Application Security Project (OWASP)</i><span class="reference-accessdate">. Retrieved <span class="nowrap">March 10,</span> 2025</span>.</cite></span>
</li>
<li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite id="CITEREFJeff_Forristal_(signing_as_rain.forest.puppy)1998" class="citation journal cs1">Jeff Forristal (signing as rain.forest.puppy) (December 25, 1998). <a rel="nofollow" class="external text" href="http://www.phrack.com/issues.html?issue=54&amp;id=8#article">"NT Web Technology Vulnerabilities"</a>. <i><a href="Phrack_Magazine" class="mw-redirect" title="Phrack Magazine">Phrack Magazine</a></i>. <b>8</b> (54 (article 8)). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20140319065810/http://www.phrack.com/issues.html?issue=54&amp;id=8#article">Archived</a> from the original on March 19, 2014.</cite></span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project">"Category:OWASP Top Ten Project"</a>. Open Web Application Security Project (OWASP). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20110519235909/https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project">Archived</a> from the original on May 19, 2011<span class="reference-accessdate">. Retrieved <span class="nowrap">June 3,</span> 2011</span>.</cite></span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.owasp.org/index.php/Top_10_2013-Top_10">"Category:OWASP Top Ten Project"</a>. Open Web Application Security Project (OWASP). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20131009150041/https://www.owasp.org/index.php/Top_10_2013-Top_10">Archived</a> from the original on October 9, 2013<span class="reference-accessdate">. Retrieved <span class="nowrap">August 13,</span> 2013</span>.</cite></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://owasp.org/www-project-top-ten/2017/Top_10">"OWASP Top 10 Application Security Risks - 2017"</a>. <i>Open Web Application Security Project (OWASP)</i><span class="reference-accessdate">. Retrieved <span class="nowrap">March 9,</span> 2025</span>.</cite></span>
</li>
<li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://owasp.org/Top10/">"OWASP Top 10 2021"</a>. <i>Open Web Application Security Project (OWASP)</i><span class="reference-accessdate">. Retrieved <span class="nowrap">March 9,</span> 2025</span>.</cite></span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://owasp.org/Top10/A03_2021-Injection/">"A03:2021 – Injection"</a>. <i>Open Web Application Security Project (OWASP)</i><span class="reference-accessdate">. Retrieved <span class="nowrap">March 9,</span> 2025</span>.</cite></span>
</li>
<li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><cite class="citation cs2"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20210224035314/http://publibfp.dhe.ibm.com/epubs/pdf/c2736111.pdf">"How to Enter SQL Comments"</a> <span class="cs1-format">(PDF)</span>, <i>IBM Informix Guide to SQL: Syntax</i>, IBM, pp.&nbsp;<span class="nowrap">13–</span>14, archived from <a rel="nofollow" class="external text" href="http://publibfp.dhe.ibm.com/epubs/pdf/c2736111.pdf">the original</a> <span class="cs1-format">(PDF)</span> on February 24, 2021<span class="reference-accessdate">, retrieved <span class="nowrap">June 4,</span> 2018</span></cite></span>
</li>
<li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20160708190141/http://howto.hackallthethings.com/2016/07/extracting-multiple-bits-per-request.html">"Extracting Multiple Bits Per Request From Full-blind SQL Injection Vulnerabilities"</a>. Hack All The Things. Archived from <a rel="nofollow" class="external text" href="http://howto.hackallthethings.com/2016/07/extracting-multiple-bits-per-request.html">the original</a> on July 8, 2016<span class="reference-accessdate">. Retrieved <span class="nowrap">July 8,</span> 2016</span>.</cite></span>
</li>
<li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20080614203711/http://www.justinclarke.com/archives/2006/03/sqlbrute.html">"Using SQLBrute to brute force data from a blind SQL injection point"</a>. Justin Clarke. Archived from <a rel="nofollow" class="external text" href="http://www.justinclarke.com/archives/2006/03/sqlbrute.html">the original</a> on June 14, 2008<span class="reference-accessdate">. Retrieved <span class="nowrap">October 18,</span> 2008</span>.</cite></span>
</li>
<li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text"><cite id="CITEREFmacd3v" class="citation web cs1">macd3v. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20121214193021/http://forum.intern0t.org/web-hacking-war-games/818-blind-sql-injection.html">"Blind SQL Injection tutorial"</a>. Archived from <a rel="nofollow" class="external text" href="http://forum.intern0t.org/web-hacking-war-games/818-blind-sql-injection.html">the original</a> on December 14, 2012<span class="reference-accessdate">. Retrieved <span class="nowrap">December 6,</span> 2012</span>.</cite><span class="cs1-maint citation-comment"><code class="cs1-code">{{cite web}}</code>: CS1 maint: numeric names: authors list (link)</span></span>
</li>
<li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><cite id="CITEREFAndrey_RassokhinDmitry_Oleksyuk" class="citation web cs1">Andrey Rassokhin; Dmitry Oleksyuk. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20121209032723/http://nobunkum.ru/analytics/en-tdss-botnet">"TDSS botnet: full disclosure"</a>. Archived from <a rel="nofollow" class="external text" href="http://nobunkum.ru/analytics/en-tdss-botnet">the original</a> on December 9, 2012<span class="reference-accessdate">. Retrieved <span class="nowrap">December 6,</span> 2012</span>.</cite></span>
</li>
<li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><cite class="citation news cs1"><a rel="nofollow" class="external text" href="https://www.bbc.com/news/technology-34636308">"Questions for TalkTalk - BBC News"</a>. <i>BBC News</i>. October 26, 2015. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20151026113434/http://www.bbc.com/news/technology-34636308">Archived</a> from the original on October 26, 2015<span class="reference-accessdate">. Retrieved <span class="nowrap">October 26,</span> 2015</span>.</cite></span>
</li>
<li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_Cheat_Sheet.html">"Input Validation Cheat Sheet"</a>. <i>Open Web Application Security Project (OWASP)</i><span class="reference-accessdate">. Retrieved <span class="nowrap">March 10,</span> 2025</span>.</cite></span>
</li>
<li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/07-Input_Validation_Testing/05.7-Testing_for_ORM_Injection">"Testing for ORM Injection"</a>. <i>OWASP</i><span class="reference-accessdate">. Retrieved <span class="nowrap">March 17,</span> 2025</span>.</cite></span>
</li>
<li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.appsecmonkey.com/blog/sql-injection-attack-and-prevention/">"SQL Injection Attacks &amp; Prevention: Complete Guide"</a>. <i>appsecmonkey.com</i>. February 13, 2021<span class="reference-accessdate">. Retrieved <span class="nowrap">February 24,</span> 2021</span>.</cite></span>
</li>
<li id="cite_note-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-19">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://dev.mysql.com/doc/refman/8.4/en/string-literals.html">"MySQL String Literals"</a>.</cite></span>
</li>
<li id="cite_note-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-20">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://dev.mysql.com/doc/refman/8.4/en/select.html">"MySQL SELECT Statement"</a>.</cite></span>
</li>
<li id="cite_note-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-21">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://dev.mysql.com/doc/refman/8.4/en/identifiers.html">"MySQL Schema Object Names"</a>.</cite></span>
</li>
<li id="cite_note-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-22">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20120709141229/http://www.securityfocus.com/news/346">"Guesswork Plagues Web Hole Reporting"</a>. <a href="SecurityFocus" title="SecurityFocus">SecurityFocus</a>. March 6, 2002. Archived from <a rel="nofollow" class="external text" href="http://www.securityfocus.com/news/346">the original</a> on July 9, 2012.</cite></span>
</li>
<li id="cite_note-23"><span class="mw-cite-backlink"><b><a href="#cite_ref-23">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20100117054540/http://www.xiom.com/whid-2005-46">"WHID 2005-46: Teen uses SQL injection to break to a security magazine web site"</a>. Web Application Security Consortium. November 1, 2005. Archived from <a rel="nofollow" class="external text" href="http://www.xiom.com/whid-2005-46">the original</a> on January 17, 2010<span class="reference-accessdate">. Retrieved <span class="nowrap">December 1,</span> 2009</span>.</cite></span>
</li>
<li id="cite_note-24"><span class="mw-cite-backlink"><b><a href="#cite_ref-24">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20110213051033/http://www.xiom.com/whid-2006-3">"WHID 2006-3: Russian hackers broke into a RI GOV website"</a>. Web Application Security Consortium. January 13, 2006. Archived from <a rel="nofollow" class="external text" href="http://www.xiom.com/whid-2006-3">the original</a> on February 13, 2011<span class="reference-accessdate">. Retrieved <span class="nowrap">May 16,</span> 2008</span>.</cite></span>
</li>
<li id="cite_note-25"><span class="mw-cite-backlink"><b><a href="#cite_ref-25">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.informationweek.com/architecture/anti-us-hackers-infiltrate-army-servers/d/d-id/1079964">"Anti-U.S. Hackers Infiltrate Army Servers"</a>. <a href="Information_Week" class="mw-redirect" title="Information Week">Information Week</a>. May 29, 2009. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20161220152101/http://www.informationweek.com/architecture/anti-us-hackers-infiltrate-army-servers/d/d-id/1079964">Archived</a> from the original on December 20, 2016<span class="reference-accessdate">. Retrieved <span class="nowrap">December 17,</span> 2016</span>.</cite></span>
</li>
<li id="cite_note-26"><span class="mw-cite-backlink"><b><a href="#cite_ref-26">^</a></b></span> <span class="reference-text"><cite id="CITEREFAlex_Papadimoulis2008" class="citation web cs1">Alex Papadimoulis (April 15, 2008). <a rel="nofollow" class="external text" href="http://thedailywtf.com/Articles/Oklahoma-Leaks-Tens-of-Thousands-of-Social-Security-Numbers,-Other-Sensitive-Data.aspx">"Oklahoma Leaks Tens of Thousands of Social Security Numbers, Other Sensitive Data"</a>. <a href="The_Daily_WTF" title="The Daily WTF">The Daily WTF</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20080510115005/http://thedailywtf.com/Articles/Oklahoma-Leaks-Tens-of-Thousands-of-Social-Security-Numbers,-Other-Sensitive-Data.aspx">Archived</a> from the original on May 10, 2008<span class="reference-accessdate">. Retrieved <span class="nowrap">May 16,</span> 2008</span>.</cite></span>
</li>
<li id="cite_note-27"><span class="mw-cite-backlink"><b><a href="#cite_ref-27">^</a></b></span> <span class="reference-text"><cite class="citation news cs1"><a rel="nofollow" class="external text" href="http://news.bbc.co.uk/2/hi/americas/8206305.stm">"US man 'stole 130m card numbers'"</a>. BBC. August 17, 2009. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20090818100739/http://news.bbc.co.uk/2/hi/americas/8206305.stm">Archived</a> from the original on August 18, 2009<span class="reference-accessdate">. Retrieved <span class="nowrap">August 17,</span> 2009</span>.</cite></span>
</li>
<li id="cite_note-28"><span class="mw-cite-backlink"><b><a href="#cite_ref-28">^</a></b></span> <span class="reference-text"><cite class="citation news cs1"><a rel="nofollow" class="external text" href="http://krebsonsecurity.com/2010/07/pirate-bay-hack-exposes-user-booty/">"The pirate bay attack"</a>. July 7, 2010. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20100824183455/http://krebsonsecurity.com/2010/07/pirate-bay-hack-exposes-user-booty/">Archived</a> from the original on August 24, 2010.</cite></span>
</li>
<li id="cite_note-29"><span class="mw-cite-backlink"><b><a href="#cite_ref-29">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://alicebobandmallory.com/articles/2010/09/23/did-little-bobby-tables-migrate-to-sweden">"Did Little Bobby Tables migrate to Sweden?"</a>. Alicebobandmallory.com. <a rel="nofollow" class="external text" href="https://archive.today/20120701141648/http://alicebobandmallory.com/articles/2010/09/23/did-little-bobby-tables-migrate-to-sweden">Archived</a> from the original on July 1, 2012<span class="reference-accessdate">. Retrieved <span class="nowrap">June 3,</span> 2011</span>.</cite></span>
</li>
<li id="cite_note-30"><span class="mw-cite-backlink"><b><a href="#cite_ref-30">^</a></b></span> <span class="reference-text"><cite class="citation news cs1"><a rel="nofollow" class="external text" href="https://www.bbc.co.uk/news/technology-11711478">"Royal Navy website attacked by Romanian hacker"</a>. BBC News. November 8, 2010. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20101109044947/http://www.bbc.co.uk/news/technology-11711478">Archived</a> from the original on November 9, 2010<span class="reference-accessdate">. Retrieved <span class="nowrap">November 15,</span> 2023</span>.</cite></span>
</li>
<li id="cite_note-31"><span class="mw-cite-backlink"><b><a href="#cite_ref-31">^</a></b></span> <span class="reference-text"><cite id="CITEREFSam_Kiley2010" class="citation web cs1">Sam Kiley (November 25, 2010). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20101128093507/http://news.sky.com/skynews/Home/World-News/Stuxnet-Worm-Virus-Targeted-At-Irans-Nuclear-Plant-Is-In-Hands-Of-Bad-Guys-Sky-News-Sources-Say/Article/201011415827544">"Super Virus A Target For Cyber Terrorists"</a>. Archived from <a rel="nofollow" class="external text" href="http://news.sky.com/skynews/Home/World-News/Stuxnet-Worm-Virus-Targeted-At-Irans-Nuclear-Plant-Is-In-Hands-Of-Bad-Guys-Sky-News-Sources-Say/Article/201011415827544">the original</a> on November 28, 2010<span class="reference-accessdate">. Retrieved <span class="nowrap">November 25,</span> 2010</span>.</cite></span>
</li>
<li id="cite_note-32"><span class="mw-cite-backlink"><b><a href="#cite_ref-32">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20110727234547/http://www.networkworld.com/news/2011/041211-hacker-breaks-into-barracuda-networks.html?hpg1=bn">"Hacker breaks into Barracuda Networks database"</a>. Archived from <a rel="nofollow" class="external text" href="http://www.networkworld.com/news/2011/041211-hacker-breaks-into-barracuda-networks.html?hpg1=bn">the original</a> on July 27, 2011.</cite></span>
</li>
<li id="cite_note-DSLReports-33"><span class="mw-cite-backlink"><b><a href="#cite_ref-DSLReports_33-0">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.dslreports.com/forum/r25793356-">"site user password intrusion info"</a>. Dslreports.com. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20121018190124/http://www.dslreports.com/forum/r25793356-">Archived</a> from the original on October 18, 2012<span class="reference-accessdate">. Retrieved <span class="nowrap">June 3,</span> 2011</span>.</cite></span>
</li>
<li id="cite_note-Cnet_News-34"><span class="mw-cite-backlink"><b><a href="#cite_ref-Cnet_News_34-0">^</a></b></span> <span class="reference-text"><cite class="citation news cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20120321203011/http://news.cnet.com/8301-27080_3-20058471-245.html">"DSLReports says member information stolen"</a>. Cnet News. April 28, 2011. Archived from <a rel="nofollow" class="external text" href="http://news.cnet.com/8301-27080_3-20058471-245.html">the original</a> on March 21, 2012<span class="reference-accessdate">. Retrieved <span class="nowrap">April 29,</span> 2011</span>.</cite></span>
</li>
<li id="cite_note-The_Tech_Herald-35"><span class="mw-cite-backlink"><b><a href="#cite_ref-The_Tech_Herald_35-0">^</a></b></span> <span class="reference-text"><cite class="citation news cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20110430234009/http://www.thetechherald.com/article.php/201117/7127/DSLReports-com-breach-exposed-more-than-100-000-accounts">"DSLReports.com breach exposed more than 100,000 accounts"</a>. The Tech Herald. April 29, 2011. Archived from <a rel="nofollow" class="external text" href="http://www.thetechherald.com/article.php/201117/7127/DSLReports-com-breach-exposed-more-than-100-000-accounts">the original</a> on April 30, 2011<span class="reference-accessdate">. Retrieved <span class="nowrap">April 29,</span> 2011</span>.</cite></span>
</li>
<li id="cite_note-36"><span class="mw-cite-backlink"><b><a href="#cite_ref-36">^</a></b></span> <span class="reference-text"><cite class="citation cs2"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20110606051745/http://www.electronista.com/articles/11/06/02/lulz.security.hits.sony.again.in.security.message">"LulzSec hacks Sony Pictures, reveals 1m passwords unguarded"</a>, <i>electronista.com</i>, June 2, 2011, archived from <a rel="nofollow" class="external text" href="http://www.electronista.com/articles/11/06/02/lulz.security.hits.sony.again.in.security.message/">the original</a> on June 6, 2011<span class="reference-accessdate">, retrieved <span class="nowrap">June 3,</span> 2011</span></cite></span>
</li>
<li id="cite_note-PBS_Breached_-_How_Hackers_Probably_Did_It-37"><span class="mw-cite-backlink"><b><a href="#cite_ref-PBS_Breached_-_How_Hackers_Probably_Did_It_37-0">^</a></b></span> <span class="reference-text"><cite class="citation news cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20110629080422/http://blog.imperva.com/2011/05/pbs-breached-how-hackers-probably-did-it.html">"Imperva.com: PBS Hacked - How Hackers Probably Did It"</a>. Archived from <a rel="nofollow" class="external text" href="http://blog.imperva.com/2011/05/pbs-breached-how-hackers-probably-did-it.html">the original</a> on June 29, 2011<span class="reference-accessdate">. Retrieved <span class="nowrap">July 1,</span> 2011</span>.</cite></span>
</li>
<li id="cite_note-38"><span class="mw-cite-backlink"><b><a href="#cite_ref-38">^</a></b></span> <span class="reference-text"><cite id="CITEREFNgak" class="citation web cs1">Ngak, Chenda. <a rel="nofollow" class="external text" href="https://www.cbsnews.com/news/yahoo-reportedly-hacked-is-your-account-safe/">"Yahoo reportedly hacked: Is your account safe?"</a>. <i><a href="CBS_News" title="CBS News">CBS News</a></i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20120714054030/http://www.cbsnews.com/8301-501465_162-57470956-501465/yahoo-reportedly-hacked-is-your-account-safe/">Archived</a> from the original on July 14, 2012<span class="reference-accessdate">. Retrieved <span class="nowrap">July 16,</span> 2012</span>.</cite></span>
</li>
<li id="cite_note-39"><span class="mw-cite-backlink"><b><a href="#cite_ref-39">^</a></b></span> <span class="reference-text"><cite id="CITEREFYap2012" class="citation web cs1">Yap, Jamie (July 12, 2012). <a rel="nofollow" class="external text" href="https://www.zdnet.com/article/450000-user-passwords-leaked-in-yahoo-breach/">"450,000 user passwords leaked in Yahoo breach"</a>. <i>ZDNet</i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20140702174127/http://www.zdnet.com/450000-user-passwords-leaked-in-yahoo-breach-7000000772/">Archived</a> from the original on July 2, 2014<span class="reference-accessdate">. Retrieved <span class="nowrap">February 18,</span> 2017</span>.</cite></span>
</li>
<li id="cite_note-40"><span class="mw-cite-backlink"><b><a href="#cite_ref-40">^</a></b></span> <span class="reference-text"><cite id="CITEREFPerlroth2012" class="citation news cs1">Perlroth, Nicole (October 3, 2012). <a rel="nofollow" class="external text" href="https://bits.blogs.nytimes.com/2012/10/03/hackers-breach-53-universities-dump-thousands-of-personal-records-online/">"Hackers Breach 53 Universities and Dump Thousands of Personal Records Online"</a>. <i>New York Times</i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20121005021105/http://bits.blogs.nytimes.com/2012/10/03/hackers-breach-53-universities-dump-thousands-of-personal-records-online/">Archived</a> from the original on October 5, 2012.</cite></span>
</li>
<li id="cite_note-41"><span class="mw-cite-backlink"><b><a href="#cite_ref-41">^</a></b></span> <span class="reference-text"><cite id="CITEREFKovacs2013" class="citation web cs1">Kovacs, Eduard (November 4, 2013). <a rel="nofollow" class="external text" href="http://news.softpedia.com/news/Hackers-Leak-Data-Allegedly-Stolen-from-Chinese-Chamber-of-Commerce-Website-396936.shtml">"Hackers Leak Data Allegedly Stolen from Chinese Chamber of Commerce Website"</a>. <i>Softpedia News</i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20140302164439/http://news.softpedia.com/news/Hackers-Leak-Data-Allegedly-Stolen-from-Chinese-Chamber-of-Commerce-Website-396936.shtml">Archived</a> from the original on March 2, 2014<span class="reference-accessdate">. Retrieved <span class="nowrap">February 27,</span> 2014</span>.</cite></span>
</li>
<li id="cite_note-42"><span class="mw-cite-backlink"><b><a href="#cite_ref-42">^</a></b></span> <span class="reference-text">Damon Poeter. <a rel="nofollow" class="external text" href="https://www.pcmag.com/article2/0,2817,2462057,00.asp">'Close-Knit' Russian Hacker Gang Hoards 1.2 Billion ID Creds</a> <a rel="nofollow" class="external text" href="https://web.archive.org/web/20170714132244/https://www.pcmag.com/article2/0,2817,2462057,00.asp">Archived</a> July 14, 2017, at the <a href="Wayback_Machine" title="Wayback Machine">Wayback Machine</a>, <i>PC Magazine</i>, August 5, 2014</span>
</li>
<li id="cite_note-43"><span class="mw-cite-backlink"><b><a href="#cite_ref-43">^</a></b></span> <span class="reference-text">Nicole Perlroth. <a rel="nofollow" class="external text" href="https://www.nytimes.com/2014/08/06/technology/russian-gang-said-to-amass-more-than-a-billion-stolen-internet-credentials.html?_r=0">Russian Gang Amasses Over a Billion Internet Passwords</a> <a rel="nofollow" class="external text" href="https://web.archive.org/web/20170227073652/https://www.nytimes.com/2014/08/06/technology/russian-gang-said-to-amass-more-than-a-billion-stolen-internet-credentials.html?_r=0">Archived</a> February 27, 2017, at the <a href="Wayback_Machine" title="Wayback Machine">Wayback Machine</a>, <i>The New York Times</i>, August 5, 2014.</span>
</li>
<li id="cite_note-44"><span class="mw-cite-backlink"><b><a href="#cite_ref-44">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20161024090111/https://ico.org.uk/about-the-ico/news-and-events/news-and-blogs/2016/10/talktalk-gets-record-400-000-fine-for-failing-to-prevent-october-2015-attack/">"TalkTalk gets record £400,000 fine for failing to prevent October 2015 attack"</a>. October 5, 2016. Archived from <a rel="nofollow" class="external text" href="https://ico.org.uk/about-the-ico/news-and-events/news-and-blogs/2016/10/talktalk-gets-record-400-000-fine-for-failing-to-prevent-october-2015-attack/">the original</a> on October 24, 2016<span class="reference-accessdate">. Retrieved <span class="nowrap">October 23,</span> 2016</span>.</cite></span>
</li>
<li id="cite_note-45"><span class="mw-cite-backlink"><b><a href="#cite_ref-45">^</a></b></span> <span class="reference-text"><cite id="CITEREFGoodin2021" class="citation news cs1">Goodin, Dan (March 2, 2021). <a rel="nofollow" class="external text" href="https://arstechnica.com/gadgets/2021/03/rookie-coding-mistake-prior-to-gab-hack-came-from-sites-cto/">"Rookie coding mistake prior to Gab hack came from site's CTO"</a>. <i>Ars Technica</i>.</cite></span>
</li>
<li id="cite_note-46"><span class="mw-cite-backlink"><b><a href="#cite_ref-46">^</a></b></span> <span class="reference-text"><cite id="CITEREFGoodin2021" class="citation news cs1">Goodin, Dan (March 8, 2021). <a rel="nofollow" class="external text" href="https://arstechnica.com/information-technology/2021/03/gab-a-haven-for-pro-trump-conspiracy-theories-has-been-hacked-again/">"Gab, a haven for pro-Trump conspiracy theories, has been hacked again"</a>. <i>Ars Technica</i>.</cite></span>
</li>
<li id="cite_note-47"><span class="mw-cite-backlink"><b><a href="#cite_ref-47">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://arstechnica.com/information-technology/2023/06/mass-exploitation-of-critical-moveit-flaw-is-ransacking-orgs-big-and-small/">"Mass exploitation of critical MOVEit flaw is ransacking orgs big and small"</a>. <i>Ars Technica</i>. June 6, 2023<span class="reference-accessdate">. Retrieved <span class="nowrap">March 9,</span> 2025</span>.</cite></span>
</li>
<li id="cite_note-48"><span class="mw-cite-backlink"><b><a href="#cite_ref-48">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.theverge.com/2024/9/8/24239026/airline-security-bug-tsa-security-database-sql-injection-hack">"Researchers say a bug let them add fake pilots to rosters used for TSA checks"</a>. <i>The Verge</i>. September 8, 2024<span class="reference-accessdate">. Retrieved <span class="nowrap">March 9,</span> 2025</span>.</cite></span>
</li>
<li id="cite_note-49"><span class="mw-cite-backlink"><b><a href="#cite_ref-49">^</a></b></span> <span class="reference-text"><cite id="CITEREFMunroe" class="citation web cs1">Munroe, Randall. <a rel="nofollow" class="external text" href="http://xkcd.com/327/">"XKCD: Exploits of a Mom"</a>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20130225190751/http://www.xkcd.com/327/">Archived</a> from the original on February 25, 2013<span class="reference-accessdate">. Retrieved <span class="nowrap">February 26,</span> 2013</span>.</cite></span>
</li>
<li id="cite_note-50"><span class="mw-cite-backlink"><b><a href="#cite_ref-50">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20171107060055/https://www.techrepublic.com/blog/it-security/the-bobby-tables-guide-to-sql-injection/">"The Bobby Tables Guide to SQL Injection"</a>. September 15, 2009. Archived from <a rel="nofollow" class="external text" href="https://www.techrepublic.com/blog/it-security/the-bobby-tables-guide-to-sql-injection/">the original</a> on November 7, 2017<span class="reference-accessdate">. Retrieved <span class="nowrap">October 30,</span> 2017</span>.</cite></span>
</li>
<li id="cite_note-51"><span class="mw-cite-backlink"><b><a href="#cite_ref-51">^</a></b></span> <span class="reference-text"><cite class="citation web cs1 cs1-prop-foreign-lang-source"><a rel="nofollow" class="external text" href="http://niebezpiecznik.pl/post/jego-firma-ma-w-nazwie-sql-injection-nie-zazdroscimy-tym-ktorzy-beda-go-fakturowali/">"Jego firma ma w nazwie SQL injection. Nie zazdrościmy tym, którzy będą go fakturowali&nbsp;;)"</a>. <i>Niebezpiecznik</i> (in Polish). September 11, 2014. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20140924073521/http://niebezpiecznik.pl/post/jego-firma-ma-w-nazwie-sql-injection-nie-zazdroscimy-tym-ktorzy-beda-go-fakturowali/">Archived</a> from the original on September 24, 2014<span class="reference-accessdate">. Retrieved <span class="nowrap">September 26,</span> 2014</span>.</cite></span>
</li>
</ol></div>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<ul><li><a rel="nofollow" class="external text" href="https://cheatsheetseries.owasp.org/cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.html">OWASP SQL Injection Cheat Sheets</a>, by OWASP.</li>
<li><a rel="nofollow" class="external text" href="http://projects.webappsec.org/SQL-Injection">WASC Threat Classification - SQL Injection Entry</a>, by the Web Application Security Consortium.</li>
<li><a rel="nofollow" class="external text" href="https://drive.google.com/file/d/1mOsNvMhsrudDz8kBiisdkdKyFvqbH0A-/view?usp=sharing">Why SQL Injection Won't Go Away</a> <a rel="nofollow" class="external text" href="https://web.archive.org/web/20121109235333/http://docs.google.com/leaf?id=0BykNNUTb95yzYTRjMjNjMWEtODBmNS00YzgwLTlmMGYtNWZmODI2MTNmZWYw&amp;sort=name&amp;layout=list&amp;num=50">Archived</a> November 9, 2012, at the <a href="Wayback_Machine" title="Wayback Machine">Wayback Machine</a>, by Stuart Thomas.</li>
<li><a rel="nofollow" class="external text" href="https://go.microsoft.com/?linkid=9707610">SDL Quick security references on SQL injection</a> by Bala Neerumalla.</li>
<li><a rel="nofollow" class="external text" href="https://arstechnica.com/information-technology/2016/10/how-security-flaws-work-sql-injection/">How security flaws work: SQL injection</a></li></ul>
<div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}


/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1236075235">
/* start https://en.wikipedia.org/ */


.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}


/* end https://en.wikipedia.org/ */
</style></div><div role="navigation" class="navbox" aria-labelledby="Information_security92" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="3"><style data-mw-deduplicate="TemplateStyles:r1239400231">
/* start https://en.wikipedia.org/ */


.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><div id="Information_security92" style="font-size:114%;margin:0 4em"><a href="Information_security" title="Information security">Information security</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Threat_(computer)" class="mw-redirect" title="Threat (computer)">Threats</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Adware" title="Adware">Adware</a></li>
<li><a href="Advanced_persistent_threat" title="Advanced persistent threat">Advanced persistent threat</a></li>
<li><a href="Arbitrary_code_execution" title="Arbitrary code execution">Arbitrary code execution</a></li>
<li><a href="Backdoor_(computing)" title="Backdoor (computing)">Backdoors</a></li>
<li>Bombs
<ul><li><a href="Fork_bomb" title="Fork bomb">Fork</a></li>
<li><a href="Logic_bomb" title="Logic bomb">Logic</a></li>
<li><a href="Time_bomb_(software)" title="Time bomb (software)">Time</a></li>
<li><a href="Zip_bomb" title="Zip bomb">Zip</a></li></ul></li>
<li><a href="Hardware_backdoor" title="Hardware backdoor">Hardware backdoors</a></li>
<li><a href="Code_injection" title="Code injection">Code injection</a></li>
<li><a href="Crimeware" title="Crimeware">Crimeware</a></li>
<li><a href="Cross-site_scripting" title="Cross-site scripting">Cross-site scripting</a></li>
<li><a href="Cross-site_leaks" title="Cross-site leaks">Cross-site leaks</a></li>
<li><a href="DOM_clobbering" title="DOM clobbering">DOM clobbering</a></li>
<li><a href="History_sniffing" title="History sniffing">History sniffing</a></li>
<li><a href="Cryptojacking" title="Cryptojacking">Cryptojacking</a></li>
<li><a href="Botnet" title="Botnet">Botnets</a></li>
<li><a href="Data_breach" title="Data breach">Data breach</a></li>
<li><a href="Drive-by_download" title="Drive-by download">Drive-by download</a></li>
<li><a href="Browser_Helper_Object" title="Browser Helper Object">Browser Helper Objects</a></li>
<li><a href="Computer_virus" title="Computer virus">Viruses</a></li>
<li><a href="Data_scraping" title="Data scraping">Data scraping</a></li>
<li><a href="Denial-of-service_attack" title="Denial-of-service attack">Denial-of-service attack</a></li>
<li><a href="Eavesdropping" title="Eavesdropping">Eavesdropping</a></li>
<li><a href="Email_fraud" title="Email fraud">Email fraud</a></li>
<li><a href="Email_spoofing" title="Email spoofing">Email spoofing</a></li>
<li><a href="Exploit_(computer_security)" title="Exploit (computer security)">Exploits</a></li>
<li><a href="Dialer#Fraudulent_dialer" title="Dialer">Fraudulent dialers</a></li>
<li><a href="Hacktivism" title="Hacktivism">Hacktivism</a></li>
<li><a href="Infostealer" title="Infostealer">Infostealer</a></li>
<li><a href="Insecure_direct_object_reference" title="Insecure direct object reference">Insecure direct object reference</a></li>
<li><a href="Keystroke_logging" title="Keystroke logging">Keystroke loggers</a></li>
<li><a href="Malware" title="Malware">Malware</a></li>
<li><a href="Payload_(computing)" title="Payload (computing)">Payload</a></li>
<li><a href="Phishing" title="Phishing">Phishing</a>
<ul><li><a href="Voice_phishing" title="Voice phishing">Voice</a></li></ul></li>
<li><a href="Polymorphic_engine" title="Polymorphic engine">Polymorphic engine</a></li>
<li><a href="Privilege_escalation" title="Privilege escalation">Privilege escalation</a></li>
<li><a href="Ransomware" title="Ransomware">Ransomware</a></li>
<li><a href="Rootkit" title="Rootkit">Rootkits</a></li>
<li><a href="Scareware" title="Scareware">Scareware</a></li>
<li><a href="Shellcode" title="Shellcode">Shellcode</a></li>
<li><a href="Spamming" title="Spamming">Spamming</a></li>
<li><a href="Social_engineering_(security)" title="Social engineering (security)">Social engineering</a></li>
<li><a href="Spyware" title="Spyware">Spyware</a></li>
<li><a href="Software_bug" title="Software bug">Software bugs</a></li>
<li><a href="Trojan_horse_(computing)" title="Trojan horse (computing)">Trojan horses</a></li>
<li><a href="Hardware_Trojan" title="Hardware Trojan">Hardware Trojans</a></li>
<li><a href="Remote_access_trojan" class="mw-redirect" title="Remote access trojan">Remote access trojans</a></li>
<li><a href="Vulnerability_(computer_security)" title="Vulnerability (computer security)">Vulnerability</a></li>
<li><a href="Web_shell" title="Web shell">Web shells</a></li>
<li><a href="Wiper_(malware)" title="Wiper (malware)">Wiper</a></li>
<li><a href="Computer_worm" title="Computer worm">Worms</a></li>

<li><a href="Rogue_security_software" title="Rogue security software">Rogue security software</a></li>
<li><a href="Zombie_(computing)" title="Zombie (computing)">Zombie</a></li></ul>
</div></td><td class="noviewer navbox-image" rowspan="3" style="width:1px;padding:0 0 0 2px"><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Defenses</th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Application_security" title="Application security">Application security</a>
<ul><li><a href="Secure_coding" title="Secure coding">Secure coding</a></li>
<li>Secure by default</li>
<li><a href="Secure_by_design" title="Secure by design">Secure by design</a>
<ul><li><a href="Misuse_case" title="Misuse case">Misuse case</a></li></ul></li></ul></li>
<li><a href="Computer_access_control" title="Computer access control">Computer access control</a>
<ul><li><a href="Authentication" title="Authentication">Authentication</a>
<ul><li><a href="Multi-factor_authentication" title="Multi-factor authentication">Multi-factor authentication</a></li></ul></li>
<li><a href="Authorization" title="Authorization">Authorization</a></li></ul></li>
<li><a href="Computer_security_software" title="Computer security software">Computer security software</a>
<ul><li><a href="Antivirus_software" title="Antivirus software">Antivirus software</a></li>
<li><a href="Security-focused_operating_system" title="Security-focused operating system">Security-focused operating system</a></li></ul></li>
<li><a href="Data-centric_security" title="Data-centric security">Data-centric security</a></li>
<li><a href="Obfuscation_(software)" title="Obfuscation (software)">Software obfuscation</a></li>
<li><a href="Data_masking" title="Data masking">Data masking</a></li>
<li><a href="Encryption" title="Encryption">Encryption</a></li>
<li><a href="Firewall_(computing)" title="Firewall (computing)">Firewall</a></li>
<li><a href="Intrusion_detection_system" title="Intrusion detection system">Intrusion detection system</a>
<ul><li><a href="Host-based_intrusion_detection_system" title="Host-based intrusion detection system">Host-based intrusion detection system</a> (HIDS)</li>
<li><a href="Anomaly_detection" title="Anomaly detection">Anomaly detection</a></li></ul></li>
<li><a href="Information_security_management" title="Information security management">Information security management</a>
<ul><li><a href="Information_risk_management" class="mw-redirect" title="Information risk management">Information risk management</a></li>
<li><a href="Security_information_and_event_management" title="Security information and event management">Security information and event management</a> (SIEM)</li></ul></li>
<li><a href="Runtime_application_self-protection" title="Runtime application self-protection">Runtime application self-protection</a></li>
<li><a href="Site_isolation" title="Site isolation">Site isolation</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Related<br>security<br>topics</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Computer_security" title="Computer security">Computer security</a></li>
<li><a href="Automotive_security" title="Automotive security">Automotive security</a></li>
<li><a href="Cybercrime" title="Cybercrime">Cybercrime</a>
<ul><li><a href="Cybersex_trafficking" title="Cybersex trafficking">Cybersex trafficking</a></li>
<li><a href="Computer_fraud" title="Computer fraud">Computer fraud</a></li></ul></li>
<li><a href="Cybergeddon" title="Cybergeddon">Cybergeddon</a></li>
<li><a href="Cyberterrorism" title="Cyberterrorism">Cyberterrorism</a></li>
<li><a href="Cyberwarfare" title="Cyberwarfare">Cyberwarfare</a></li>
<li><a href="Electronic_warfare" title="Electronic warfare">Electronic warfare</a></li>
<li><a href="Information_warfare" title="Information warfare">Information warfare</a></li>
<li><a href="Internet_security" title="Internet security">Internet security</a></li>
<li><a href="Mobile_security" title="Mobile security">Mobile security</a></li>
<li><a href="Network_security" title="Network security">Network security</a></li>
<li><a href="Copy_protection" title="Copy protection">Copy protection</a></li>
<li><a href="Digital_rights_management" title="Digital rights management">Digital rights management</a></li></ul>
</div></td></tr></tbody></table></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-07-18" href="https://en.wikipedia.org/wiki/?title=SQL_injection&amp;oldid=1301167701">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>